home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 48 / Amiga Format CD48 (1999-12-13)(Future Publishing)(GB)(Track 1 of 2)[!][issue 2000-01].iso / -websites- / whdload / games / bloodwych.lha / BloodwychHD / Install Bloodwych < prev    next >
Text File  |  1998-06-21  |  2KB  |  127 lines

  1. ;****************************
  2.  
  3. ;(set #sub-dir "")        ;sub directory containing data files
  4. ;(set #readme-file "README")    ;name of readme file
  5.  
  6. ;****************************
  7.  
  8. ;----------------------------
  9. ; Checks if given program is reachable via the path
  10. ; if not abort install
  11. ; IN:  #program - to check
  12. ; OUT: -
  13.  
  14. (procedure P_chkrun
  15.   (if
  16.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  17.     ("")
  18.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  19.   )
  20. )
  21.  
  22. ;----------------------------
  23. ; Wait for inserting disk
  24. ; IN:  #AD_disk - name of disk
  25. ; OUT: -
  26.  
  27. (procedure P_disk
  28.   (askdisk
  29.     (dest " ")
  30.     (prompt ("\nInsert \"%s\" in any drive !\n" #AD_disk))
  31.     (help #insertdisk-help)
  32.   )
  33. )
  34.  
  35. ;****************************
  36.  
  37. (set #program "WHDLoad")
  38. (P_chkrun)
  39.  
  40. (set @default-dest
  41.   (askdir
  42.     (prompt ("Where should \"%s\" be installed ?\nA drawer \"%s\" will automatically be created." @app-name @app-name))
  43.     (help @askdir-help)
  44.     (default @default-dest)
  45.     (disk)
  46.   )
  47. )
  48. (set #dest (tackon @default-dest @app-name))
  49. (if
  50.   (exists #dest)
  51.   (
  52.     (set #choice
  53.       (askbool
  54.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  55.         (default 1)
  56.         (choices "Delete" "Skip")
  57.         (help @askbool-help)
  58.       )
  59.     )
  60.     (if
  61.       (= #choice 1)
  62.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  63.     )
  64.   )
  65. )
  66. (makedir #dest
  67.   (help @makedir-help)
  68.   (infos)
  69. )
  70.  
  71. ;----------------------------
  72.  
  73.   (copyfiles
  74.    (help @copyfiles-help)
  75.    (source ("bw.slave"))
  76.    (dest #dest)
  77.   )
  78.   (copyfiles
  79.    (help @copyfiles-help)
  80.    (source ("Bloodwych.inf"))
  81.    (newname ("Bloodwych.info"))
  82.    (dest #dest)  
  83.   )
  84.   (copyfiles
  85.    (help @copyfiles-help)
  86.    (source ("Install Notes"))
  87.    (dest #dest)  
  88.   )
  89.   (copyfiles
  90.    (help @copyfiles-help)
  91.    (source ("Install Notes.info"))
  92.    (dest #dest)  
  93.   )
  94.   (copyfiles
  95.    (help @copyfiles-help)
  96.    (source ("ReadMe"))
  97.    (dest #dest)  
  98.   )
  99.   (copyfiles
  100.    (help @copyfiles-help)
  101.    (source ("ReadMe.info"))
  102.    (dest #dest)  
  103.   )
  104.  
  105.  
  106.  
  107.  
  108. ;----------------------------
  109.  
  110. (set #AD_disk "Bloodwych")
  111. (set #program " :C/BLOODWYCH")
  112. (P_disk)
  113. (copyfiles
  114.   (help @copyfiles-help)
  115.   (source (" :C/"))
  116.   (dest #dest)
  117.   (pattern "#?")
  118. )
  119.  
  120. (if
  121.   (= 0 (run "Reloc" (tackon #dest "TEST") (tackon #dest "TEST") "QUIET" ">con://///WAIT/CLOSE/AUTO"))
  122.   ("")
  123.   (abort "\"Reloc\" could not find the intro pic!")
  124. )
  125.  
  126. (exit)
  127.